/**
 * F2E全局配置
 * @return {[type]} [description]
 */
define([], function() {
    var _Nav = [{
        "id": 1,
        "name": "电子邮件",
        "type": "office",
        "app": "email",
        "description": "电子邮件",
        "show": true,
        "orderNum": 1,
        "url": "https://mail.datayes.com"
    }, {
        "id": 2,
        "name": "社交办公",
        "type": "office",
        "app": "sns",
        "description": "社交办公",
        "show": true,
        "orderNum": 2,
        "url": "http://oa.datayes.com"
    }, {
        "id": 3,
        "name": "工作流",
        "type": "office",
        "app": "workflow",
        "description": "工作流",
        "show": true,
        "orderNum": 3,
        "url": "http://workflow.datayes.com"
    }, {
        "id": 6,
        "name": "JIRA",
        "type": "office",
        "app": "jira",
        "description": "JIRA",
        "show": true,
        "orderNum": 4,
        "url": "http://jira.datayes.com"
    }, {
        "id": 7,
        "name": "Confluence",
        "type": "office",
        "app": "confluence",
        "description": "Confluence",
        "show": true,
        "orderNum": 5,
        "url": "http://confluence.datayes.com"
    }, {
        "id": 8,
        "name": "投资研究平台",
        "type": "office",
        "app": "irp",
        "description": "投资研究平台",
        "show": true,
        "orderNum": 6,
        "url": "#"
    }, {
        "id": 5,
        "name": "固定收益",
        "type": "invest",
        "app": "fixedincome",
        "description": "固定收益平台",
        "show": true,
        "orderNum": 7,
        "url": "#"
    }, {
        "id": 4,
        "name": "智能大数据分析平台",
        "type": "invest",
        "app": "news",
        "description": "智能大数据分析平台",
        "show": true,
        "orderNum": 8,
        "url": "#"
    }];
    return {
        //根据应用APP获取导航配置
        getNavConfigByAPP: function(appName) {
            var apps = {
                currentApp: null,
                list: []
            };
            $.each(_Nav, function(i, nav) {
                if (nav['show']) {
                    nav['className'] = "";
                    if (nav['app'] == appName) {
                        apps.currentApp = $.extend(true, {}, nav);
                        nav['className'] = 'cur ';
                    }
                    nav['className'] += nav['app'] + "-1";

                    apps.list.push(nav);
                }
            });
            return apps;
        }
    }
})